package com.gip.service.Impl;

import com.gip.mapper.UserMapper;
import com.gip.pojo.User;
import com.gip.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Transactional
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> findAllUser() {

        return userMapper.findAllUser();

    }

    @Override
    public User findUserById(int id) {

        return userMapper.findUserById(id);
    }

    @Override
    public int upDateUser(User user) {

        return userMapper.upDateUser(user);
    }

    @Override
    public int deleteUser(int id) {
        return userMapper.deleteUser(id);
    }

    @Override
    public int conutUser() {

        return userMapper.conutUser();
    }

    @Override
    public List<User> findUserByIf(Map map) {

        return userMapper.findUserByIf(map);
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public int deleteUsers(List list) {
        return userMapper.deleteUsers(list);
    }

}

